package com.mdb.data;

import com.mdb.model.User;
import com.mongodb.BasicDBObject;

public enum Table implements ITable {
	User("User", new Creator() {
		@Override
		public BaseModel create(BasicDBObject o) {
			return new User(o);
		}
	})
	;

	private final String name;
	private final Creator creator;

	private Table(final String name, final Creator creator) {
		this.name = name;
		this.creator = creator;
	}

	public String getName() {
		return name;
	}

	public Creator getCreator() {
		return creator;
	}
}